#include "qitemwidgetplugin.h"

#include "qmylistview.h"

#include <qplugin.h>

QItemWidgetPlugin::QItemWidgetPlugin()
{
    tagWidgetInfo info;

    info.m_category="Item View";
    info.m_class="QListView";
    info.m_icon=":/images/widgets/listbox.png";
    info.m_name="List View";
    info.m_ui="<ui>"
              " <widget class=\"QListView\">"
              "  <property name=\"objectName\">"
              "   <string>listView</string>"
              "  </property>"
              " </widget>"
              "</ui>";
    m_widgetInfos.insert("QListView",info);
}

QWidget *QItemWidgetPlugin::createWidget(const QString &widgetName, QWidget *parentWidget)
{
    QWidget* ret=NULL;

    if(widgetName=="QListView")
    {
        ret=new QMyListView(parentWidget);
    }

    return ret;
}

QStringList QItemWidgetPlugin::keys()
{
    QStringList ret;

    ret<<"QListView";

    return ret;
}


Q_EXPORT_PLUGIN2(QItemWidgetPlugin, QItemWidgetPlugin)
